package com.designpatterns.creational.builder.improve;

import com.designpatterns.creational.builder.Actor;

//public abstract class ActorBuilder {
//    protected static Actor actor = new Actor();
//
//    public abstract void buildType();
//    public abstract void buildSex();
//    public abstract void buildFace();
//    public abstract void buildCostume();
//    public abstract void buildHairstyle();
//
//    public static Actor construct(ActorBuilder ab){
//        ab.buildCostume();
//        ab.buildSex();
//        ab.buildFace();
//        ab.buildHairstyle();
//        ab.buildType();
//        return actor;
//    }
//}

public abstract class ActorBuilder {
    protected Actor actor = new Actor();

    public abstract void buildType();

    public abstract void buildSex();

    public abstract void buildFace();

    public abstract void buildCostume();

    public abstract void buildHairstyle();

    public Actor construct() {
        this.buildType();
        this.buildSex();
        this.buildHairstyle();
        this.buildCostume();
        this.buildFace();
        return this.actor;
    }
}
